package main

import "fmt"

func main() {
	slice := make([]int, 2)
	slice[0] = 1
	slice[1] = 2

	var a interface{} = slice
	fmt.Printf("a value is %v, type is %[1]T\n", a) // a value is [1 2], type is []int

	// var slice2 []int = a // error
	var slice2 []int = a.([]int)
	fmt.Printf("slice2 value is %v, type is %[1]T\n", slice2) // slice2 value is [1 2], type is []int
}
